package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.ApprovalRecord;
import com.lh.service.ApprovalRecordService;
import com.lh.utils.Answer;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/ApprovalRecord")
public class ApprovalRecordController {
    @Resource
    private ApprovalRecordService approvalRecordService;

    @RequestMapping("/addApprovalRecord")
    public Answer<Object> addApprovalRecord(@RequestBody ApprovalRecord approvalRecord) {
        return  approvalRecordService.addApprovalRecord(approvalRecord);
    }


    @RequestMapping("/getApprovalRecordPage")
    public Answer<Object> getApprovalRecordPage(@RequestBody JSONObject reqJson) {
        return  approvalRecordService.getApprovalRecordPage(reqJson);
    }

    @RequestMapping("/titleList")
    public Answer<Object> titleList() {
        return  approvalRecordService.titleList();
    }
}
